package com.qcxk.yuqian.rtu.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qcxk.yuqian.rtu.entity.Rtu;
import com.qcxk.yuqian.rtu.entity.RtuMeter;
import com.qcxk.yuqian.rtu.mapper.RtuMapper;
import com.qcxk.yuqian.rtu.mapper.RtuMeterMapper;
import com.qcxk.yuqian.rtu.service.IRtuMeterService;
import com.qcxk.yuqian.rtu.service.IRtuService;
import com.qcxk.yuqian.system.component.QueryWrapperConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @auther lp
 * @create 2021-11-15 03:21:45
 * @describe 服务实现类
 */
@Service
public class RtuMeterServiceImpl extends ServiceImpl<RtuMeterMapper, RtuMeter> implements IRtuMeterService {
    @Autowired
    private RtuMeterMapper rtuMeterMapper;


    @Override
    public Page queryRtuPage(Page page, Rtu rtu) {
        return null;
    }

    @Override
    public boolean deleteRtuById(Rtu rtu) {
        return false;
    }

    @Override
    public Page queryRtuStatusPage(Page page, Rtu rtu) {
        return null;
    }

    @Override
    public Rtu findRtu(Rtu rtu) {
        return null;
    }

    @Override
    public int batchAddRtuMeter(List<RtuMeter> list) {
        return rtuMeterMapper.batchAddRtuMeterData(list);
    }

    @Override
    public List<Map<String,String>> findRtuMeter(Long id) {
        return rtuMeterMapper.selectRtuMeter(id);
    }
    @Override
    public   Map<String, String> findRtuMeterById(Long id) {
        return rtuMeterMapper.selectRtuMeterById(id);
    }
    @Override
    public   List<Map<String, String>> findListRtuMeterById(Long id) {
        return rtuMeterMapper.selectListRtuMeterById(id);
    }
    @Override
    public Map findRtuMeterByIdAndMeterCode(Long id,String meterCode) {
        return rtuMeterMapper.selectRtuMeterByIdAndMeterCode(id,meterCode);
    }
    @Override
    public Map findRtuMeterByRtuIdAndMeterCode(Long id,String meterCode) {
        return rtuMeterMapper.selectRtuMeterByRtuIdAndMeterCode(id,meterCode);
    }

    @Override
    public int addRtuMeter(RtuMeter rm) {
        return rtuMeterMapper.add(rm);
    }
}
